// app.js
var http = require('./utils/http')
var fly = require('./utils/fly')
var tools = require('./utils/tools')
require('./utils/leancloud-init')
App({
    onLaunch() {
        //尝试从本地存储提取用户信息
        try {
            var value = wx.getStorageSync('userInfo')
            if (value) {
                // Do something with return value
                this.globalData.userInfo = value
            }
        } catch (e) {
            // Do something when catch error
        }
    },
    globalData: {
        userInfo: null
    },
    ...http,
    fly,
    ...tools
})